﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SortInfoList.aspx.cs"
    Inherits="SortInfoList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <link type="text/css" href="css/style.css" rel="stylesheet" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript" src="js/lib.js"></script>
    <script type="text/javascript">
    $(function(){
        BindBtn();
        AddTrClass($("#listinfo"));
    })
    function ShowDialog(type,id){
        var url="",title,name;
        var infotype=<%=(int)eType%>;
        var name = "<%=Until.GetArticleName(eType)%>";
        var count=<%=GetSortCount()%>;
        switch(type)
        {
            case 1:
                title="新增"+name+"分类";
                url="DoSortInfo.aspx?type=edit&infotype="+infotype+"&id="+id+"&count="+count;
                break;
            case 2:
                title="编辑"+name+"分类";
                url="DoSortInfo.aspx?type=add&infotype="+infotype+"&count="+count;
                break;
        }
        top.CreateIframe(title,url,500,150);
    }
    </script>
</head>
<body>
    <form id="form1" runat="server" style="height:100%;">
        <div id="conBox">
            <div class="ctrlbar">
                <div class="f-left">
                </div>
                <div class="f-right">
                    <a href="javascript:ShowDialog(2,0)" class="toolbtn">
                        <img src="images/ico-add.gif">新 增</a>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="grid-box">
                <table class="grid-table">
                    <thead>
                        <tr>
                            <th class="align-l">
                                名称</th>
                            <td class="align-l">
                                Url重写名称</td>
                            <td class="align-c">
                                上移</td>
                            <td class="align-c">
                                下移</td>
                            <td class="align-c">
                                编辑</td>
                            <td class="align-c">
                                删除</td>
                        </tr>
                    </thead>
                    <tbody id="listinfo">
                        <asp:Repeater ID="rptSort" runat="server" OnItemDataBound="rptSort_ItemDataBound"
                            OnItemCommand="rptSort_ItemCommand">
                            <ItemTemplate>
                                <tr>
                                    <td <%#GetCss(Eval("SortIndex"))%>>
                                        <%#Server.HtmlEncode(Eval("Name").ToString())%>
                                    </td>
                                    <td>
                                    <%#Eval("PageUrlName")%>
                                    </td>
                                    <td class='align-c'>
                                        <asp:ImageButton ID="btnUp" CommandName="OrderUp" ImageUrl="images/up.gif" runat="server" ToolTip="上移" />
                                    </td>
                                    <td class='align-c'>
                                        <asp:ImageButton ID="btnDown" CommandName="OrderDown" ImageUrl="images/down.gif" runat="server" ToolTip="下移" />
                                    </td>
                                    <td class='align-c'>
                                        <a href="javascript:ShowDialog(1,<%#Eval("ID")%>)"><img alt="编辑" src="images/ico-edit.gif" /></a>
                                    </td>
                                    <td class='align-c'>
                                     <asp:ImageButton ID="btnDelete" runat="server" CommandName="Delete" CommandArgument='<%#Eval("ID")+","+Eval("ParentID")+","+Eval("ImgPlace")%>' ImageUrl="images/ico-delete.gif" OnClientClick="return confirm('确定要删除该分类吗?');" ToolTip="删除" /></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </tbody>
                </table>
                <div id="noData" runat="server">
                    <div class="noDateMsg">
                        没有任何分类！</div>
                </div>
                 <asp:Button ID="btnReset" runat="server" Text="Button" OnClick="btnReset_Click" style="display:none;" />
            </div>
        </div>
    </form>
</body>
</html>
